package com.kfm.controller;

import com.kfm.model.Account;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class ParamsController {
    @RequestMapping("/find")
    public String find(String id, String name, Account account){
        return "hello";
    }

    @RequestMapping("/array")
    public String array(){
        return "hello";
    }

    @RequestMapping("/param")
    public String param(@RequestParam("ids") String[] ids,@RequestParam(value = "name",defaultValue = "abc") String username){
        return "hello";
    }

    @RequestMapping("/body")
    public String body(@RequestBody Account body ){
        return "hello";
    }
    @RequestMapping("/delete/{id}")
    public String delete(@PathVariable("id")String id){
        return "hello";
    }
}
